<?php
require 'vendor/autoload.php';
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;

class ApplicationContext {

	public static function getServices($serviceId){
		$container = new ContainerBuilder();
		$loader = new XmlFileLoader($container, new FileLocator("properties"));
		$loader->load('services.xml');
		$service = $container->get($serviceId);
		return $service;
	}

	public static function getTestServices($serviceId) {
		$container = new ContainerBuilder();
		$loader = new XmlFileLoader($container, new FileLocator('tests/resources'));
		$loader->load('services-test.xml');
		$service = $container->get($serviceId);
		return $service;
	}
}